package compilers.AST.statement;

import java.util.Iterator;

import compilers.AST.basics.FunctionCallTerm;
import compilers.AST.basics.Identifier;
import compilers.AST.basics.Parameter;
import compilers.compiler.PGenerator;
import compilers.exceptions.SemanticalException;
import compilers.symbolTable.SymbolTableFunctionElement;
import compilers.symbolTable.SymbolTableScope;
import compilers.symbolTable.SymbolTableVariableElement;

public class FunctionCallStatement extends Statement {
	
	private FunctionCallTerm fFunctionCallTerm;

	public FunctionCallStatement(FunctionCallTerm functionCallTerm) {
		fFunctionCallTerm = functionCallTerm;
	}
	
	public FunctionCallStatement(FunctionCallTerm functionCallTerm, int lineNr) {
		super(lineNr);
		fFunctionCallTerm = functionCallTerm;
	}

	public void print(int identLevel) {
		println(identLevel, "FunctionCallStatement");
		fFunctionCallTerm.print(identLevel+1);
	}
	
	public void checkSemantics(SymbolTableScope currentScope) throws SemanticalException {
		fFunctionCallTerm.checkSemantics(currentScope);
	}
	
	public void generatePcode(PGenerator pGen, SymbolTableScope currentScope) {
		fFunctionCallTerm.generatePcode(pGen, currentScope);
	}
}
